package com.itany.corejava.code16_反射.zuoye;

import java.util.Arrays;
import java.util.List;

/**
 * @author MissChen
 * @date 2024年03月27日 8:55
 */
public class Emp {
    private Integer id;
    private String name;
    private Double salary;
    private Dept dept;
    public static List<Emp> getData(){
        Dept d1=new Dept(1,"人事部");
        Dept d2=new Dept(2,"市场部");
        Dept d3=new Dept(3,"财务部");
        Dept d4=new Dept(4,"工程部");
        Dept d5=new Dept(5,"营销部");
        return Arrays.asList(
                new Emp(1,"tom",9000.0,d1),
                new Emp(2,"alice",8000.0,d2),
                new Emp(3,"baby",4000.0,d1),
                new Emp(4,"coco",5000.0,d3),
                new Emp(5,"lily",9000.0,d5),
                new Emp(6,"cici",10000.0,d2),
                new Emp(7,"admin",2000.0,d3),
                new Emp(8,"bruce",5000.0,d4),
                new Emp(9,"blake",87000.0,d3),
                new Emp(10,"smith",8000.0,d2)
        );
    }

    public Emp(Integer id, String name, Double salary, Dept dept) {
        this.id = id;
        this.name = name;
        this.salary = salary;
        this.dept = dept;
    }

    public Emp() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    @Override
    public String toString() {
        return "Emp{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", salary=" + salary +
                ", dept=" + dept +
                '}';
    }
}
